package xyz.liut.ee.api

import jakarta.servlet.annotation.WebServlet
import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse
import xyz.liut.ee.web.BaseServlet

/**
 * 模拟服务器错误
 */
@WebServlet("/500")
class ServerError : BaseServlet() {

    override fun service(req: HttpServletRequest, resp: HttpServletResponse) {
        super.service(req, resp)
        resp.status = 500
    }

    override fun doHead(req: HttpServletRequest?, resp: HttpServletResponse?) {
    }

    override fun doGet(req: HttpServletRequest?, resp: HttpServletResponse?) {
    }

    override fun doPost(req: HttpServletRequest?, resp: HttpServletResponse?) {
    }

}
